var userRouter = require('./module/user')
var rootRouter = require('./module/root')
var adminRouter = require('./module/admin')
var loginRouter = require("./module/login")


module.exports = function (app) {
    // app.get('/user/blogList',pageAdmin.checkAuth, pageAdmin.pageList);
    // app.all('/user/post',pageAdmin.checkAuth, pageAdmin.pagePost);
    //路由分离
    app.use('/',rootRouter);
    app.use('/user',userRouter);
    app.use('/admin',adminRouter);
    app.use('/login',loginRouter);
    app.use((req, res) => { // 没有匹配到页面自动跳转到404页面
        res.send('404')
    })
}